<script setup lang="ts">
import { computed, provide } from 'vue'
import { useSystemSettingStore } from '@renderer/store/pinia/systemSetting'
import { ElConfigProvider } from 'element-plus'
import cn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'
import ja from 'element-plus/dist/locale/ja.mjs'
import { getProvider } from '@renderer/init'
import { devtools } from '@vue/devtools'

provide('pyImgHandlerIo', getProvider())

if (process.env.NODE_ENV === 'development') {
  devtools.connect(/* host (the default is "http://localhost"), port (the default is 8090) */)
}

const languageMap = {
  cn: cn,
  en: en,
  ja: ja
}

const systemSettingStore = useSystemSettingStore()
const language = computed(() => {
  return languageMap[systemSettingStore.systemSetting.language]
})


</script>

<template>
  <el-config-provider :locale="language">
    <router-view>
    </router-view>
  </el-config-provider>
</template>

<style>
.scan-tips p {
  font-size: 50px !important;
}
</style>
